<template>
	<view class="instrumentInfo">
		<view class="title">仪器设备管理卡</view>
		<view class="e_row">
			<div class="ename">设备名称</div>
			<div class="content">{{formData.deviceName}}</div>
		</view>
	<!-- 	<div class="other">
			<div class="h_row"> -->
				<view class="e_row">
					<div class="ename">设备编号</div>
					<div class="content">{{formData.deviceId}}</div>
				</view>
				<view class="e_row">
					<div class="ename">出厂编号</div>
					<div class="content">{{formData.produceId}}</div>
				</view>
				<view class="e_row">
					<div class="ename">规格型号</div>
					<div class="content">{{formData.specification}}</div>
				</view>
				<view class="e_row">
					<div class="ename">购置日期</div>
					<div class="content">{{formData.acquisitionDates}}</div>
				</view>
		<!-- 	</div>
			<div class="sq"></div>
		</div> -->
		<view class="e_row">
			<div class="ename">生产厂家</div>
			<div class="content">{{formData.manufacturer}}</div>
		</view>
		<view class="e_row">
			<div class="ename">使用单位</div>
			<div class="content">{{formData.companyName}}</div>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formData:{
					 fId: "", //主键id，有:编辑 无:新增
					                companyId: "", //标段id
					                companyName: "", //标段名称
					                deviceId: "", //设备id
					                deviceName: "", //设备名称
					                specification: "", //规格型号
					                manufacturer: "", //生产厂家
					                produceDates: "", //出厂日期
					                produceId: "", //出厂编号
					                range: "", //量程
					                technicalSpecification: "", //技术参数
					                acquisitionDates: "", //购置日期
					                measuringRange: "", //测量范围
					                accuracy: "", //准确度
					                calibratingPeriod: "", //检定/校准周期(月)
					                manager: "", //管理人
					                unit: "", //计量单位
					                department: "", //所属部门
					                storagePlace: "", //存储地点
					                count: "", //数量
					                price: "", //单价
					                functionName: "", //功能室
					                supplier: "", //供货商
					                status: "", //使用状态
					                remark: "", //备注
					                picture: "", //图片
					                recordfiles: [ //编辑功能需要需要删除图片信息
					
					                ]
				}
			}
		},
		onLoad(option) {
			this.getDetailData({
				fId: window.location.href.split("=")[1]
			})
			uni.setNavigationBarTitle({
				title: '人员信息'
			})





		},
		methods: {
			// 详情
			getDetailData(data) {

				var that = this;
		

				that.$http.getInstrumentInfo(data).then(res => {
					if (res.errcode == 0) {

					this.formData=res.data.yjQmpMsInstrumentinfo
							
					} else {
						uni.showToast({
							title: "请求失败",
							icon: 'none',
							duration: 2000
						});
					}

				}, (err) => {
					uni.showToast({
						title: "接口报错",
						icon: 'none',
						duration: 2000
					});
				})

			},
			downloadPdfClick() {
				// 下载情景1:h5内嵌app,通过分享给朋友的方式进行下载
				if (this.from == 'app') {
					let item = 'http://自己的域名/hybrid/html/web/pdf.html?shareUrl=' + encodeURIComponent(this.bgUrl) +
						'&shareTitle=PDF文件';
					window.open(item);
					return;

				} else if (this.from == 'wx wq') {
					// 下载情景2:h5内嵌微信小程序,从h5页面跳转到小程序页面后,然后通过调用小程序原生API进行下载
					// 注意: 先要引入微信jssdk  [命令: npm install jweixin-module]
					// this.$wx.miniProgram.navigateTo({
					// 	url: '/pages/pdf/pdf_download?pdf='+ encodeURIComponent(this.bgUrl) //小程序页面链接
					// });
				}

			}
		}
	}
</script>


<style lang="less" scoped>
	.instrumentInfo {
		width: 670upx;
		margin: 50upx 40upx 0;
		height: 572upx;
		box-sizing: border-box;
		border: 2upx solid #000;
		border-bottom: none;
		text-align: center;
		
		.title {
			height: 80upx;
			line-height: 80upx;
			border-bottom: 2upx solid #000;
			letter-spacing: 4upx;
			font-size: 32upx;
			font-weight: 600;
			
		}
		.e_row {
			display: flex;
			height: 70upx;
			line-height: 70upx;
			font-size: 10upx;
			border-bottom: 2upx solid #000;
			.ename {
				width: 20%;
				border-right: 2upx solid #000;
				
			}
			.content {
				width: 80%;
				// display: flex;
				// justify-content: space-between;
				padding: 0 8upx;
			}
		}
		.other {
			display: flex;
			.h_row {
				width: 65%;
				.e_row {
					display: flex;
					height: 70upx;
					line-height: 70upx;
					font-size: 10upx;
					border-bottom: 2upx solid #000;
					.ename {
						width: 32%;
						border-right: 2upx solid #000;
						
					}
					.content {
						width: 70%;
						// display: flex;
						// justify-content: space-between;
						padding: 0 8upx;
					}
				}
			}
			.sq {
				width: 35%;
				border-left: 2upx solid #000;
				border-bottom: 2upx solid #000;
			}
		}
	}
</style>